package com.xian.minespring.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * {@code @Around} annotation's default handler
 */
public class AroundInvocationHandler implements InvocationHandler {
    Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        logger.info("@Around Aop invoke...");
        return method.invoke(proxy, args);
    }
}
